<!--
描述：查詢管理修改
开发人：jiangbiao
开发日期：2019/06/22
-->
<template lang="pug">
  kalix-dialog.user-add(title='修改' bizKey="inquire" ref="kalixBizDialog" v-bind:formModel.sync="formModel" v-bind:targetURL="targetURL")
    div.el-form(slot="dialogFormSlot")
      el-form-item.short(label="查询分类名称" prop="type" v-bind:label-width="labelWidth" v-bind:rules="rules.type")
        kalix-select(v-model="formModel.type" v-bind:requestUrl="requestUrl"  placeholder="请选择查询分类名称"
        v-bind:defaultSelect="true" v-bind:id="value")
      el-form-item.short(label="查询内容" prop="content" v-bind:label-width="labelWidth" v-bind:rules="rules.content")
        el-input(v-model="formModel.content")
</template>

<script type="text/ecmascript-6">
  import {InquireURL, InquireTypeURL} from '../../config.toml'
  import FormModel from './model'
  export default {
    name: 'inquireEdit',
    data() {
      return {
        downloadURL: InquireURL,
        labelWidth: '150px',
        formModel: Object.assign({}, FormModel),
        rules: {
          type: [{required: true, message: '请选择查询分类名称', trigger: 'change'}],
          content: [{required: true, message: '请输入查询内容', trigger: 'change'}]
        },
        targetURL: InquireURL,
        requestUrl: InquireTypeURL,
        value: 'name'
      }
    }
  }
</script>

<style scoped lang="stylus" type="text/stylus">
  .el-form
    width 50%
    margin auto
    .radio
      margin-left 150px
      margin-bottom 20px
      .el-radio
        color: #3465cb
        font-weight: bold
        font-size: 14px
</style>
